#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int bin_search(int arr[], int left, int right, int key)
{
	int i = 0;
	int sz = sizeof arr[10] / sizeof arr[i];
	left = 0;
	right = sz-1;
	while (left <= right)
	{
		if (arr[left] == key)
		{
			return left;
			break;
		}
		else if(arr[right] == key)
		{
			return right;
			break;
		}
		else
		{
			left++;
			right++;
		}

	}
	return -1;

}
int main()
{
	int search = 0;
	int left = 0;
	int right = 0;
	int arr[10] = { 1,2,3,4,5,6,7,8,9,10 };
	scanf("%d",&search);
	int ret = bin_search(arr[10], left, right, search);
	printf("%d",ret);



	return 0;
}